.PHONY:
windows:stack.exe
	stack.exe
stack.exe:main.obj stack.obj
	gcc -o stack.exe main.obj stack.obj -g
main.obj: main.c
	gcc -c main.c -o main.obj -g
stack.obj: stack.c
	gcc -c stack.c -o stack.obj -g



linux:stack
	./stack
stack:main.o stack.o
	gcc -o stack main.o stack.o -g
main.o: main.c
	gcc -c main.c -o main.o -g
stack.o: stack.c
	gcc -c stack.c -o stack.o -g

cleanlinux:
	rm -f main.o
	rm -f stack.o

cleanwindows:
	windowsdelete.bat


windowsanswer:answer.exe
	answer.exe
answer.exe:answermain.obj answerstack.obj
	gcc -o answer.exe answermain.obj answerstack.obj -g
answermain.obj: main.c
	gcc -c main.c -o answermain.obj -g
answerstack.obj: answer.c
	gcc -c answer.c -o answerstack.obj -g



linuxanswer:answer
	./answer
answer:answermain.o answerstack.o
	gcc -o answer answermain.o answerstack.o -g
answermain.o: main.c
	gcc -c main.c -o answermain.o -g
answerstack.o: answer.c
	gcc -c answer.c -o answerstack.o -g

cleananswerlinux:
	rm -f answermain.o
	rm -f answerstack.o

cleananswerwindows:
	windowsdelete.bat